package mvc.model.service.impl;

import mvc.model.dao.UserDao;
import mvc.model.dao.impl.UserDaoImpl;
import mvc.model.pojos.UserBean;
import mvc.model.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    private final static UserDao userDao = new UserDaoImpl();
    @Override
    public UserBean login(String uname, String upass) {
        return userDao.login(uname, upass);
    }

    @Override
    public UserBean queryOne(int uid) {
        return userDao.queryOne(uid);
    }

    @Override
    public UserBean queryOne(String uname) {
        return userDao.queryOne(uname);
    }

    @Override
    public List<UserBean> query() {
        return userDao.query();
    }

    @Override
    public boolean updateUser(int uid, UserBean userBean) {
        return userDao.updateUser(uid, userBean);
    }

    @Override
    public boolean addUser(UserBean userBean) {
        return userDao.addUser(userBean);
    }
}
